What is the character that represents a null byte after ASCIIEncoding.GetString(byte[])?

Posted by Brian on Stack Overflow See other posts from Stack Overflow or by Brian
Published on 2010-03-15T18:57:34Z Indexed on 2010/03/15 18:59 UTC
Read the original article Hit count: 150

Filed under:
|
|
|

I have a byte array that may or may not have null bytes at the end of it. After converting it to a string I have a bunch of blank space at the end. I tried using Trim() to get rid of it, but it doesn't work. How can I remove all the blank space at the end of the string after converting the byte array?

I am writing this is C#.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET